package com.apes.scm.demo.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 功能：
 * @author xul
 * @create 2018-03-16 12:53
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = "mas_testM")
public class TestM extends Model {

    @Id
    @Column(name = "ID", nullable = false, length = 32)
    private String id;

//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumns({
//            @JoinColumn(name = "sales_org_id", referencedColumnName = "sales_org_id"),
//            @JoinColumn(name = "product_group_id", referencedColumnName = "product_group_id"),
//            @JoinColumn(name = "channel_id", referencedColumnName = "channel_id")
//    })
//    private SalesTerritories salesTerritories;
}
